
package org.bridgen.lang.semantics.ast;
import java.util.*;


public class OrExpr extends BoolExpr implements Cloneable {
    public void flushCache() {
        super.flushCache();
    }
     @SuppressWarnings({"unchecked", "cast"})  public OrExpr clone() throws CloneNotSupportedException {
        OrExpr node = (OrExpr)super.clone();
        node.in$Circle(false);
        node.is$Final(false);
    return node;
    }
     @SuppressWarnings({"unchecked", "cast"})  public OrExpr copy() {
      try {
          OrExpr node = (OrExpr)clone();
          if(children != null) node.children = (ASTNode[])children.clone();
          return node;
      } catch (CloneNotSupportedException e) {
      }
      System.err.println("Error: Could not clone node of type " + getClass().getName() + "!");
      return null;
    }
     @SuppressWarnings({"unchecked", "cast"})  public OrExpr fullCopy() {
        OrExpr res = (OrExpr)copy();
        for(int i = 0; i < getNumChildNoTransform(); i++) {
          ASTNode node = getChildNoTransform(i);
          if(node != null) node = node.fullCopy();
          res.setChild(node, i);
        }
        return res;
    }
    // Declared in PrettyPrint.jrag at line 245

    
    public void pp(StringBuffer buf) {
        buf.append(indent());
    	getLeft().pp(buf);
    	buf.append(" ||\n" + indent());
    	getRight().pp(buf);
    }

    // Declared in TypeCodeGen.jrag at line 503

	
	public void generateCode(String indent, StringBuffer buf) {
		getLeft().generateCode(indent, buf);
		buf.append(" || ");
		getRight().generateCode(indent, buf);
	}

    // Declared in bridgit.ast at line 3
    // Declared in bridgit.ast line 93

    public OrExpr() {
        super();


    }

    // Declared in bridgit.ast at line 10


    // Declared in bridgit.ast line 93
    public OrExpr(Expr p0, Expr p1) {
        setChild(p0, 0);
        setChild(p1, 1);
    }

    // Declared in bridgit.ast at line 15


  protected int numChildren() {
    return 2;
  }

    // Declared in bridgit.ast at line 18

  public boolean mayHaveRewrite() { return false; }

    // Declared in bridgit.ast at line 2
    // Declared in bridgit.ast line 93
    public void setLeft(Expr node) {
        setChild(node, 0);
    }

    // Declared in bridgit.ast at line 5

    public Expr getLeft() {
        return (Expr)getChild(0);
    }

    // Declared in bridgit.ast at line 9


    public Expr getLeftNoTransform() {
        return (Expr)getChildNoTransform(0);
    }

    // Declared in bridgit.ast at line 2
    // Declared in bridgit.ast line 93
    public void setRight(Expr node) {
        setChild(node, 1);
    }

    // Declared in bridgit.ast at line 5

    public Expr getRight() {
        return (Expr)getChild(1);
    }

    // Declared in bridgit.ast at line 9


    public Expr getRightNoTransform() {
        return (Expr)getChildNoTransform(1);
    }

public ASTNode rewriteTo() {
    return super.rewriteTo();
}

}
